package com.qf.dao;

import com.qf.pojo.User;

import java.sql.SQLException;

/**
 * @author Kuke
 * @date 2022/3/7
 * 针对前台用户的数据访问接口
 */
public interface UserDao {

    /**
     * 通过用户名查询用户
     * @param username  输入的用户名
     * @return 返回的用户实体
     */
    User selectUserByUsername(String username) throws SQLException;

    void addUser(User user) throws SQLException;

    User selectUserByCode(String code) throws SQLException;

    void updateUser(User user) throws SQLException;

    User selectUserByNameAndPassword(String username, String password) throws SQLException;
}
